feature: super validator infrastructure and first two validators#725
Merged
feature: super validator infrastructure and first two validators#725
Conversation
f5515f4 to
d6c13c1
Compare
d6c13c1 to
453f2c1
Compare
… for individual validator rules
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a comprehensive document validation infrastructure for the Super Editor with initial validator implementations for handling missing rId attributes in images and links.
- Creates a modular SuperValidator architecture that supports multiple document validation types
- Implements automatic validation on editor initialization and collaboration readiness events
- Adds comprehensive logging, JSDoc documentation, and 100% test coverage
Reviewed Changes
Copilot reviewed 29 out of 29 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/super-editor/src/core/Editor.js | Integrates SuperValidator into editor lifecycle |
| packages/super-editor/src/core/super-validator/ | Core validator infrastructure with logging and types |
| packages/super-editor/src/core/super-validator/validators/state/ | State validators for image nodes and link marks |
| packages/super-editor/src/core/super-converter/docx-helpers/ | Document.xml.rels utility functions for rId management |
| packages/super-editor/tsconfig.json | Updated module resolution for NodeNext |
| packages/superdoc/src/dev/components/SuperdocDev.vue | Dev environment configuration updates |
Comments suppressed due to low confidence (2)
packages/super-editor/src/core/super-validator/validators/state/nodes/link/rules/link-rid.js:27
- The variable name 'newId' is misleading since this line is finding an existing ID, not creating a new one. Consider renaming to 'existingId' or 'foundId' for clarity.
let newId = editor.converter.docxHelpers.findRelationshipIdFromTarget(href, editor);
packages/super-editor/src/core/super-validator/validators/state/nodes/image/rules/image-rid.js:25
- The variable name 'newId' is misleading since this line is finding an existing ID, not creating a new one. Consider renaming to 'existingId' or 'foundId' for clarity.
let newId = editor.converter.docxHelpers.findRelationshipIdFromTarget(src, editor);
e80612a to
c337647
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.